{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.css' %}">
    <style>
        .account {
            width: 400px;
            padding: 30px;
            margin: 50px auto;
            border: 1px solid gray;
            border-radius: 5px;
            box-shadow: 5px 5px 20px #aaa;
        }

        .user_login {
            font-size: large;
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="account">
        <h3 class="user_login">用户登录</h3>
        <!-- <div class="user_login" >用户登录</div> -->
        <form method="post" novalidate>
            {% csrf_token %}
            <div class="form-group">
                <label >用户名</label>
                {{form.username}}
                <span style="color:red;">{{form.username.errors.0}}</span>
            </div>
            <div class="form-group">
                <label >密码</label>
                {{form.password}}
                <span style="color:red;">{{form.password.errors.0}}</span>
            </div>
            <div class="form-group">
                <label for="id_code">验证码</label>
                <div class="row">
                    <div class="col-xs-7">
                        {{form.code}}
                        <span style="color:red;">{{form.code.errors.0}}</span>                
                    </div>
                    <div class="col-xs-5">
                        <img id="image_code" src="/image/code/" height="45px" >
                    </div>
                </div>
            </div>
            <input type="submit" value="登录" class="btn btn-primary">
        </form>

    </div>

</body>

</html>